from toee import *
from utilities import *
from InventoryRespawn import *

def san_dialog( attachee, triggerer ):
	attachee.turn_towards(triggerer)
	triggerer.begin_dialog( attachee, 1 )
	return SKIP_DEFAULT

def san_first_heartbeat(attachee, triggerer):
	respawn(attachee)
	game.timevent_add(respawn, (attachee), 86400000 ) #86400000ms is 24 hours
	game.new_sid = 0
	return RUN_DEFAULT

def respawn(attachee):
	box1 = find_container_near(attachee,1053)
	box2 = find_container_near(attachee,1048)
	RespawnInventory(box1)
	RespawnInventory(box2)
	game.timevent_add(respawn, (attachee), 86400000 ) #86400000ms is 24 hours
	return
